#include "wuSceneReact.h"

wuSceneReact::wuSceneReact()
{
}

wuSceneReact::~wuSceneReact()
{
}

void wuSceneReact::setup(ofxBox2d * _box2d, int _vw, int _vh, int _x, int _y)
{
//		myFBO.allocate(vw, vh, GL_RGBA);
//		myFBO.clear(0, 0, 0, 0);
		mask.allocate(vw,vh, OF_IMAGE_GRAYSCALE);
}

void wuSceneReact::update(unsigned char* colorSkin, unsigned char* graySkin)
{

		// crop bitmap
		skin.crop(colorSkin, graySkin, vw, vh);
		mask.setFromPixels( graySkin, vw, vh, OF_IMAGE_GRAYSCALE);
//		MakeFBOimage();
//		FindShape(&grayDiff);

}

void wuSceneReact::draw(bool bDrawlines, int _offX)
{
		ofPushMatrix();
			ofEnableAlphaBlending();
			ofSetColor(255, 255, 255, 255);
			skin.draw(_offX, 0, vw, vh);
			ofDisableAlphaBlending();
		ofPopMatrix();
}
